<template>
    <div>
        <diagnostic-basis :content="data" :our-conclusion="ourConclusion" :table-data="tableData" :name="name"
                          :sex="sex" :age="age" :height="height" :weight="weight" :suspicious="suspicious"/>
    </div>
</template>

<script>
import DiagnosticBasis from '@/client/templates/components/DiagnosticBasis';

export default {
    name: 'Demo',
    components: {
        DiagnosticBasis
    },
    data() {
        return {
            data: null,
            ourConclusion: '',
            tableData: [],
            name: '',
            sex: '',
            age: '',
            height: '',
            weight: '',
            suspicious: '高度可疑'
        };
    },
    mounted() {
        this.data = {
            '5': 3,
            '6': 2,
            '7': 2,
            '8': 3,
            '9': 1,
            '10': 3,
            '11': 1,
            '12': 3,
            '13': 3,
            '14': 3,
            '15': 3,
            '16': 2,
            '17': 2,
            '18': 1,
            '19': 2,
            '20': 3,
            '21': 3,
            '22': 3,
            '23': 3,
            '24': 3,
            '25': 3,
            '26': 3,
            '27': 3,
            '28': 3,
            '29': 3,
            '30': 1,
            '31': 3
        };
        this.ourConclusion = '这里是本院结论';
        console.log( this.tableData)

    },
    created() {
        this.getPatientInfo();
    },
    methods: {
        getPatientInfo() {
            const that = this;
            this.$axios({
                method: 'GET',
                url: '/PROXY-Remote/inspectionInformation/get/by/organId',
                params: {
                    page: 1,
                    size: 200,
                },
            })
                .then(function (res) {
                    if (res.data.code !== 200) {
                        throw new Error(res.data);
                    } else {
                        that.tableData = res.data.data
                    }
                })
                .catch(function (err) {
                });
        },
    }
};
</script>

<style scoped>

</style>
